Package edu.uky.ai.lp.logic
Class Negation
java.lang.Object
edu.uky.ai.lp.logic.BooleanExpression
edu.uky.ai.lp.logic.Negation
- All Implemented Interfaces:
Expression,Formula
public class Negation extends BooleanExpression
Represents an expression whose opposite is true.
- Author:
- Stephen G. Ware
-
Field Summary
Fields Modifier and Type Field Description ExpressionargumentThe expression being negated -
Constructor Summary
Constructors Constructor Description Negation(Expression argument)Constructs a negation of the given argument. -
Method Summary
Modifier and Type Method Description Negationsubstitute(Unifier unifier)Return a version of this formula with its variables replaced with the values assigned to them by a unifier.java.lang.StringtoString()Methods inherited from class edu.uky.ai.lp.logic.BooleanExpression
equals, hashCode, substituteArguments, toString, unify
-
Field Details
-
argument
The expression being negated
-
-
Constructor Details
-
Negation
Constructs a negation of the given argument.- Parameters:
argument- the expression to be negated
-
-
Method Details
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
substitute
Description copied from interface:FormulaReturn a version of this formula with its variables replaced with the values assigned to them by a unifier.- Parameters:
unifier- the unifier- Returns:
- the formula with variables replaced
-